
#ifndef __TIMER_H__
#define __TIMER_H__

// Timer
struct TIMER_STRUCT
{
	struct TIMER_STRUCT *next;
	struct TIMER_STRUCT *prev;
	struct TCB *task;
	unsigned int timeOut;

	void (*handler)(void *);
	void *args;
};

/* ------------------------------------
 * Timer API
 *------------------------------------*/
void InitTick(void);
void IncrementTick(void);
void InitTimer(void);
int TimerInit(struct TIMER_STRUCT *, unsigned int, void(*)(void *), void *);
void TimerExpiredCheck(void);

#endif /* __TIMER_H__ */
